package com.luoye.lj.platform.controller.log;


import com.luoye.lj.util.mvc.log.DescriptionGeneratorAdapter;

import java.util.Map;

/**
 * Created by wuhao on 16-3-28.
 *
 * 执行了操作【系统级别的角色修改】,参数是：{"rolename":["R_Restaurant_Manage"],"description":["餐厅管理"],"roletype":["1"],
 * "_csrf":["8f1e37a3-4650-4158-85f7-df35924fa075"],"id":["3"],"authstr":["6#14#15#16#17#18#19#20#72#"]} */
public class RoleModifyGenerator extends DescriptionGeneratorAdapter {
    @Override
    public String generate(String name, Map parameterMap) {
        String str = "";
        String rolename = ((String[]) parameterMap.get("rolename"))[0];
        String description = ((String[]) parameterMap.get("description"))[0];
        String roletype = ((String[]) parameterMap.get("roletype"))[0];
        String id = ((String[]) parameterMap.get("id"))[0];
        String authstr = ((String[]) parameterMap.get("authstr"))[0];
        str += "修改了角色，id是【"+id+"】，角色名【" + rolename + "】，描述【"
                + description + "】，角色类型【" + roletype + "】，权限【" + authstr + "】";
        return str;

    }
}
